<script setup lang="ts">
import KeywordsBidPrice
  from "~/contentScripts/views/wxt/SuperOptimization/KeywordPromotion/ProfitLossCalculator/KeywordsBidPrice.vue";
import ROIPPC from "~/contentScripts/views/wxt/SuperOptimization/KeywordPromotion/ProfitLossCalculator/ROIPPC.vue";

// 盈亏计算器
import WxtModal from "~/contentScripts/views/wxt/wxt-modal.vue";

const visible = ref(false);
const type = ref('1');
</script>

<template>
  <slot>
    <a-button size="small" type="default" @click="visible=true">盈亏计算器</a-button>
  </slot>
  <wxt-modal :width="740" :style="{
    top: undefined,
  }" title="盈亏计算器" v-model:visible="visible"
  >
    <a-radio-group v-model:value="type" size="small" style="margin-bottom: 15px;">
      <a-radio-button value="1">保本ROI/保本PPC</a-radio-button>
      <a-radio-button value="2">关键词出价</a-radio-button>
    </a-radio-group>
    <div v-if="type==1">
      <ROIPPC/>
    </div>
    <div v-if="type==2">
      <KeywordsBidPrice/>
    </div>
  </wxt-modal>
</template>

<style scoped>

</style>
